package com.tanhua.server.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.common.mapper.UserInfoMapper;
import com.tanhua.common.pojo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class UserInfoService {
    @Autowired
    private UserInfoMapper mapper;

    //根据ID查询用户
    public UserInfo selectUserInfo(Long userId) {
        return mapper.selectById(userId);
    }

    public List<UserInfo> selectUserInfos(QueryWrapper<UserInfo> wrapper) {
        return mapper.selectList(wrapper);
    }
}
